﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;

namespace PokerFunUtilities.Model
{
    public class ConfigurationTournament : INotifyPropertyChanged
    {
        public ConfigurationTournament()
        {
            m_SmallBlind = 1;
        }

        private int m_SmallBlind = 1;

        public int SmallBlind
        {
            get { return m_SmallBlind; }
            set
            {
                m_SmallBlind = value;
                this.BigBlind = value * 2;
                RaisePropertyChanged("SmallBlind");
            }
        }
        private int m_BigBlind = 2;

        public int BigBlind
        {
            get { return m_BigBlind; }
            set { 
                m_BigBlind = value;
                RaisePropertyChanged("BigBlind");
            }
        }
        private int m_PlayerNumber = 0;

        public int PlayerNumber
        {
            get { return m_PlayerNumber; }
            set { 
                m_PlayerNumber = value;
                RaisePropertyChanged("PlayerNumber");
            }
        }
        private int m_LevelTime = 20;

        public int LevelTime
        {
            get { return m_LevelTime; }
            set { 
                m_LevelTime = value;
                RaisePropertyChanged("LevelTime");
            }
        }
        private bool m_Ant = true;

        public bool Ant
        {
            get { return m_Ant; }
            set { 
                m_Ant = value;
                RaisePropertyChanged("Ant");
            }
        }
        private int m_AntValue = 0;

        public int AntValue
        {
            get { return m_AntValue; }
            set {
                m_AntValue = value;
                RaisePropertyChanged("AntValue");
            }
        }




        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        private void RaisePropertyChanged(string propName)
        {
            var p = PropertyChanged;
            if (p == null) return;
            p(this, new PropertyChangedEventArgs(propName));
        }

        #endregion
    }
}
